<?php
$this->Html->addCrumb('Consultorios Profesionales', '/consultoriosprofesionales/index');
//print_r($ConsultoriosProfesionale);
//print_r($consultorios);
?>

<div id="contenidoaddusuario">
    <div id="info">GESTIÓN DE HORARIOS DEL CONSULTORIO</div><br></br>
    <?php echo $this->Form->input('Buscar el consultorio por: ', array('type' => 'select', 'options' => array('id' => 'Identificador', 'sede' => 'Sede'))); ?>
    <?php echo $this->Form->create('Profesionale', array('controller' => 'profesionales', 'action' => 'buscar')) ?>
    <input type="text" name="data[q]" /> 
    <?php echo $this->Form->end('Buscar'); ?>
    <div class="panel-left">
        <table>
            <tr><CENTER>CONSULTORIOS</CENTER></tr>
            <?php foreach($consultorios as $consultorio): ?>
                <tr>
                    <td>Consultorio <?php echo $consultorio['Consultorio']['id'] ?></td>
                    <td><?php echo $this->Html->link('Ver', array('controller' => 'consultorios', 'action' => 'ver', $consultorio['Consultorio']['id']), array('type' => 'submit', 'width' => '180px', 'height' => '30px')) ?></td>
                </tr>
            <?php endforeach; ?>
        </table>
        <p align ="right">
            <!--inicio paginacion-->
            <?php
            echo $this->Paginator->prev('<- Ant | '),
            $this->Paginator->numbers(),
            $this->Paginator->next(' | Sig ->');
            ?>
            <!--fin paginacion-->
        </p>
    </div>
    <div class="panel-rigth">
        <table>
            <tr>
                <td><p align="right"><?php echo $this->Html->link('Asignar Médico', array('controller' => 'consultoriosprofesionales', 'action' => 'agregar', $consultorio['Consultorio']['id']), array('type' => 'submit', 'width' => '180px', 'height' => '30px')) ?></p></td>
            </tr>
        </table>
        <table>
            <tr>
                <td>Hora</td><td>Lunes</td><td>Martes</td><td>Miercoles</td><td>Jueves</td><td>Viernes</td><td>Sabado</td><td>Domingo</td>
            </tr>
            <tr>
                <td>7-9</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>9-11</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>11-1</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>2-4</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>4-6</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>6-8</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
            <tr>
                <td>8-10</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td>
            </tr>
        </table>
    </div>   
</div>